import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import SwitchView from '@/views/SwitchView.vue'
import SelectView from '@/views/SelectView'
import InputView from '@/views/InputView'
import IconView from '@/views/IconView'
import InputNumberView from '@/views/InputNumberView'
import CheckboxView from '@/views/CheckboxView'
import DialogView from '@/views/DialogView'
import CardView from '@/views/CardView'
import AlertView from '@/views/AlertView'
import ButtonView from '@/views/ButtonView'
import RadioView from '@/views/RadioView'
import TimePickerView from '@/views/TimePickerView'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/button',
    component: ButtonView
  },
  {
    path: '/radio',
    component: RadioView
  },
  {
    path: '/about',
    name: 'about',
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/switch',
    component: SwitchView
  },
  {
    path: '/select',
    component: SelectView
  },
  {
    path: '/input',
    component: InputView
  },
  {
    path: '/icon',
    component: IconView
  },
  {
    path: '/inputNumber',
    component: InputNumberView
  },
  {
    path: '/checkbox',
    component: CheckboxView
  },
  {
    path: '/dialog',
    component: DialogView
  },
  {
    path: '/card',
    component: CardView
  },
  {
    path: '/alert',
    component: AlertView
  },
  {
    path: '/time-picker',
    component: TimePickerView
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
